<%@ page language="java" pageEncoding="utf-8"%>
<div style="border:dotted 0px">
<link href="${ ctx}/skins/floatstyle.css"  rel="stylesheet" type="text/css" />

	
    <nativeSql:sqlQueryForUnique
					sql="select f_picture_appended as avatarId,f_username as username  from app_user  where f_id = ${me.id }"
					id="meavatar" />
   	
   	<div>
   	<a class="publishlink-user" style="float:left;" href="javascript:void(0);">
   	<img alt="头像"  src="${ctx}/user/file.action?method:previewPic&fileId=${meavatar.avatarId }"></img>
   	</a>
   	<div style="clear:both;"></div>
    <a style="color: #1a65a5;font-size: 15px;padding-left:6px;" href="${ctx }/blog/personalArticles.jsp?userId=${me.id }" ><strong>${meavatar.username }</strong></a>
    </div>
    <div style="clear:left;"></div>
    <div  style="padding-top:8px;">
    <strong style="font-size: 15px;">我的博客:</strong><br>
     <ul style="padding-left: 0px;margin-top: 1px;">
	 <c:if test="${blog!=null&&blog.f_manager_id==me.id }">
	 <li style="list-style-type: none;"><a href="${ctx }/blog/blog.action?method:blogDescription&blogId=${blog.f_id }"><img alt="" src="${ctx }/img/blog-create-new.png"><span  class="left-span-bold">管理博客</span></a></li></c:if>
       <li style="list-style-type: none;"><a href="${ctx }/blog/blog.action?method:newBlogForm"><img alt="" src="${ctx }/img/blog-create-new.png"><span  class="left-span-bold">新建博客</span></a></li>
         <nativeSql:sqlQueryForList
				sql="select * from t_blog where f_manager_id = ${me.id }"
				id="blogs" />
		<c:forEach items="${blogs }" var="blogo">
		
		   <li style="list-style-type: none;"><a target="_blank" href="${ctx }/blog/blogIndex.jsp?blogId=${blogo.f_id  }"><img alt="" src="${ctx }/img/blog-icon.png"><span  class="left-span-bold">${blogo.f_blog_name }</span></a></li>
		
		</c:forEach>
     </ul>     
   </div>
   
    <div  style="padding-top:8px;">
    <strong style="font-size: 15px;">热门博客:</strong><br>
     <ul style="padding-left: 0px;margin-top: 1px;">
     
     <nativeSql:sqlQueryForList
	sql="select p.f_id,p.f_blog_name from t_blog p where DATEDIFF(now(),p.f_creation_date)<100 and p.f_if_personal='1' and p.f_type='private' 
 order by (select sum(f_click) from t_article where f_blog_id = p.f_id ) desc limit 10"
	id="blogNovels" />
		<c:forEach items="${blogNovels }" var="blog">
		  <li style="list-style-type: none;">
		  	
			<yn:shortIt len="13" str="${blog.f_blog_name}" id="blogname"></yn:shortIt> 
		  <a target="_blank" href="${ctx}/blog/blog.action?method:blog&blogId=${blog.f_id }"><img alt="" src="${ctx }/img/blog-icon.png"><span  class="left-span-bold">${blogname}</span></a>
		  <hql:queryForUnique
					hql="select count(*) from Article where blogId = ${blog.f_id }"
					id="count" />(<c:if test="${count==null}">0</c:if>${count })
		  </li> 
		</c:forEach>
     
     </ul>     
   </div>
   
   <div  style="padding-top:8px;">
    <strong style="font-size: 15px;">公共博客:</strong><br>
     <ul style="padding-left: 0px;margin-top: 1px;">
     <nativeSql:sqlQueryForList
			sql="select * from t_blog where f_type = 'public' order by f_creation_date desc limit 10"
			id="publicBlogs" />
		<c:forEach items="${publicBlogs}" var="publicBlog">
		<li style="list-style-type: none;">
		<yn:shortIt len="13" str="${publicBlog.f_blog_name}" id="blogName"/> 
		 <a target="_blank" href="${ctx }/blog/blogIndex.jsp?blogId=${publicBlog.f_id  }"><img alt="" src="${ctx }/img/blog-icon.png"><span  class="left-span-bold">${blogName}</span></a></li> 
		
		</c:forEach>
     
     </ul>     
   </div>
   

</div>

<style  type="text/css">

   .publishlink-user img {
position: relative;
width: 110px;
height: 110px;
display: block;
background-position: center center;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
text-indent: -9999px;
outline: none;
border: none;
-moz-box-shadow: 0 1px 2px #b0b3b6;
-webkit-box-shadow: 0 1px 2px #b0b3b6;
box-shadow: 0 1px 2px #b0b3b6;
background-color: #b0b3b6;
}

  .left-span-bold{
    font-size:12px;
    padding-left:5px;
    color: rgb(82, 99, 187);
  }

</style>
